#pragma once
#include "dllmain.h"

BEGIN_NAMESPACE_CPPX

template <typename T>
class fuListIterator
{
	typedef typename T::iterator    iter_type;
	typedef typename T::value_type  value_type;
	T &			m_rList;
	iter_type	m_Iter;

public:
	fuListIterator(T & list) : m_rList(list){}

	bool goFirst(void)
	{
		m_Iter = m_rList.begin();
		return isValid();
	}

	bool goNext(void)
	{
		++m_Iter;
		return isValid();
	}

	bool isValid(void)
	{
		return (m_Iter != m_rList.end());
	}

	value_type & getElem(void)
	{
		return (*m_Iter);
	}
};

END_NAMESPACE_CPPX
